﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace SkeletonNET.Common.Logging
{
    /// <summary>
    /// LogToConsole LogHandler for debugging purposes
    /// </summary>
    public class ToConsoleHandler : LogHandler
    {
        /// <summary>
        /// The actual implementation of logging an exception.
        /// </summary>
        /// <param name="exception">The exception.</param>
        /// <param name="data">The data.</param>
        protected override void InternalException(Exception exception, LogData data = null)
        {
            Console.WriteLine(string.Format("!!!Exception!!! {1} > {0}", exception.Message, CallerType));
        }

        /// <summary>
        /// The actual implementation of the Do method.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="data">The data.</param>
        protected override void InternalDo(string message, LogData data = null)
        {
            Console.WriteLine(string.Format("{0} > {1}", CallerType, message));
        }
    }
}
